package com.rbs.service.impl;

import com.rbs.entity.User;
import com.rbs.mapper.UserMapper;
import com.rbs.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User selectByNaAndPwd(String email, String password) {
        return userMapper.selectByNaAndPwd(email,password);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public void updateState(int userId) {
        userMapper.updateState(userId);
    }

    @Override
    public User selectById(int userId) {
        return userMapper.selectById(userId);
    }
}
